package com.ibiaoke.system.dao;

import com.ibiaoke.common.base.BaseDao;
import com.ibiaoke.common.consts.CommonConsts;
import com.ibiaoke.system.entity.AreaCity;
import com.ibiaoke.system.entity.AreaCityExample;
import com.ibiaoke.system.mapper.AreaCityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by biaoke on 2017/6/25.
 */
@Repository
public class AreaCityDao extends BaseDao<AreaCity,AreaCityExample,Integer,AreaCityMapper> {
    @Autowired
    private AreaCityMapper areaCityMapper;
    @Override
    public AreaCityMapper getMapper() {
        return areaCityMapper;
    }

    public List<AreaCity> listCity() {
        AreaCityExample example = new AreaCityExample();
        example.createCriteria().andIsUsedEqualTo(CommonConsts.YES);
        return selectByExample(example);
    }
}
